UserDividendOverride
Records in this table overrides GlobalDividends values in theo option pricing calculations. Note: Missing/empty DateAmt strings are interpreted as non-dividend paying
METADATA
Attribute | Value |
---|---|
Topic | 3585-option-pricing |
MLink Token | ClientControl |
Product | SRControl |
accessType | SELECT,UPDATE,INSERT,DELETE |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
ticker_at | enum - AssetType | PRI | 'None' | |
ticker_ts | enum - TickerSrc | PRI | 'None' | |
ticker_tk | VARCHAR(12) | PRI | '' | |
clientFirm | VARCHAR(16) | PRI | '' | |
dividendSlot | enum - DividendSlot | PRI | 'None' | |
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' | ||
text | TINYTEXT | '' | user detail if any | |
mergeType | enum - MergeType | 'None' | ||
DateAmtList | JSON | 'JSON_ARRAY()' |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
ticker_tk | 1 |
ticker_at | 2 |
ticker_ts | 3 |
clientFirm | 4 |
dividendSlot | 5 |
JSON Block (DateAmtList)
Field | Type | Comment |
---|---|---|
divDate | enum - divDate | exdividend date |
divValue | enum - divValue | dividend amount |
divCurrency | enum - divCurrency | |
divKind | enum - DivKind | dividend type |
divSource | enum - DivSource | dividend source |
divFreq | enum - DivFreq |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRControl`.`MsgUserDividendOverride` (
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '',
`dividendSlot` ENUM('None','TheoPrices','ToolOverride') NOT NULL DEFAULT 'None',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
`text` TINYTEXT NOT NULL DEFAULT '' COMMENT 'user detail (if any)',
`mergeType` ENUM('None','FullReplace','PreferOrig','PreferThis','FullReplaceIfNewer') NOT NULL DEFAULT 'None',
`DateAmtList` JSON NOT NULL DEFAULT JSON_ARRAY() CHECK(JSON_VALID(DateAmtList)),
PRIMARY KEY USING HASH (`ticker_tk`,`ticker_at`,`ticker_ts`,`clientFirm`,`dividendSlot`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='Records in this table overrides GlobalDividends values in theo option pricing calculations.\nNote: Missing/empty DateAmt strings are interpreted as non-dividend paying';
SELECT TABLE EXAMPLE QUERY
SELECT
`ticker_at`,
`ticker_ts`,
`ticker_tk`,
`clientFirm`,
`dividendSlot`,
`timestamp`,
`text`,
`mergeType`,
`DateAmtList`
FROM `SRControl`.`MsgUserDividendOverride`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm'
AND
/* Replace with a ENUM('None','TheoPrices','ToolOverride') */
`dividendSlot` = 'None';
UPDATE TABLE EXAMPLE QUERY
UPDATE `SRControl`.`MsgUserDividendOverride`
SET
/* Replace with a DATETIME(6) */
`timestamp` = '2022-01-01 12:34:56.000000',
/* Replace with a TINYTEXT */
`text` = 'dummy tiny text',
/* Replace with a ENUM('None','FullReplace','PreferOrig','PreferThis','FullReplaceIfNewer') */
`mergeType` = 'None',
/* Replace with a JSON */
`DateAmtList` = '{"key": "value"}'
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm'
AND
/* Replace with a ENUM('None','TheoPrices','ToolOverride') */
`dividendSlot` = 'None';
INSERT TABLE EXAMPLE QUERY
INSERT INTO `SRControl`.`MsgUserDividendOverride`(
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at`,
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts`,
/* Replace with a VARCHAR(12) */
`ticker_tk`,
/* Replace with a VARCHAR(16) */
`clientFirm`,
/* Replace with a ENUM('None','TheoPrices','ToolOverride') */
`dividendSlot`,
/* Replace with a DATETIME(6) */
`timestamp`,
/* Replace with a TINYTEXT */
`text`,
/* Replace with a ENUM('None','FullReplace','PreferOrig','PreferThis','FullReplaceIfNewer') */
`mergeType`,
/* Replace with a JSON */
`DateAmtList`
)
VALUES(
'None',
'None',
'Example_ticker_tk',
'Example_clientFirm',
'None',
'2022-01-01 12:34:56.000000',
'dummy tiny text',
'None',
'{"key": "value"}'
);
DELETE TABLE EXAMPLE QUERY
DELETE FROM `SRControl`.`MsgUserDividendOverride`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm'
AND
/* Replace with a ENUM('None','TheoPrices','ToolOverride') */
`dividendSlot` = 'None';
Doc Columns Query
SELECT * FROM SRControl.doccolumns WHERE TABLE_NAME='UserDividendOverride' ORDER BY ordinal_position ASC;